package com.ophiux.member.api.feign;

import com.ophiux.common.core.base.Result;
import com.ophiux.common.core.constant.ServiceNameConstants;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestParam;

/**
 * @desc:
 * @author: hhl
 * @date：2021/10/21 9:56
 */
@FeignClient(contextId = "memberFeignApi",name = ServiceNameConstants.MEMBER_SERVICE)
public interface IMemberFeignApi {

    /**
     * 根据用户id查询用户信息
     * @param userId
     * @return
     */
    @GetMapping("/member/getUserById")
    String getUserById(@RequestParam("userId") Integer userId);

    /**
     * 扣减用户金额
     * @param amount
     * @return
     */
    @GetMapping("/member/updateAmount")
    Result updateAmount(@RequestParam("amount") Integer amount);
}
